﻿@model GameSchoolApplication.Models.ViewModels.UserInfo
           
           
@{
    ViewBag.Title = "Stig";
}

<h2>Mín Stig og SBUX</h2>
    <div>
        <table border="1">
            <thead>
                <tr><th>Sæti</th><th>Stig</th><th>SBUX</th></tr>
            </thead>
                <tbody>
                <tr>
                    <td>@Model.higher </td><td>@Model.points</td><td>@Model.SBUX </td>
                </tr>
        
                </tbody>
        </table>
    </div>
    <h2>Hvernig er staðan í kringum mig</h2>
    <div>
        <table border="1">
            <thead>
                <tr><th>Sæti</th><th>Stig</th></tr>
            </thead>
                <tbody>
                <tr>
                    <td>Næsti fyrir ofan </td><td id="above"></td>
                </tr>
                 <tr>
                    <td>Næsti fyrir neðan </td><td id="below"></td>
                </tr>
        
                </tbody>
        </table>
    </div>

<script type="text/javascript">
    $(document).ready(function () {
        var param = { userID: @Model.userID }
        $.getJSON("/Account/getPointsAbove", param, function (data) {
            $("#above").html(data);
        });
        $.getJSON("/Account/getPointsBelow", param, function (dat) {
            $("#below").html(dat);
        });
    });
</script>